Linear Functions

In this topic students will learn:

Rearranging and substitution of equations

Solving linear equations

Graphing linear equations

Finding the equation of a straight line

Solving simultaneous linear equations

Rearranging & Substitution

An important skill you need to have to succeed this year is algebraically rearranging equations to make a particular pronumeral the subject.

Rearrange the equation s=u t+(1/2)a (t^2) to make a the subject:

({{({{s=u t+(1/2)a (t^2)}, {s-u t=(1/2)a (t^2)}, {2(s-u t)=a (t^2)}, {((2(s-u t))/(t^2))=a}, {put the subject to the left: a=((2(s-u t))/(t^2))}})}})

In Mathematica we can rearrange equations with unknowns using the ‘Solve’ function. Click on the line below and press ⇧+⌤:

Solve[s==u t+(1/2) a (t^2),a]

The first part is the equation we want to solve, then a comma, then what we want to solve for - in this case ‘a’.

It’s important we use == instead of =. More on this later.

Once we’ve rearranged an equation we can solve for the subject by substituting in known values for the other variables.

e.g. Given s=u t+(1/2)a (t^2), if s=30, u=5 and t=3 what is the value of a.

({{({{from above: a=((2(s-u t))/(t^2))}, {=((2(30-5×3))/(3^2))}, {=(30/9)}, {=(10/3)}})}})

Again, we can use the ‘Solve’ function in Mathematica. This time we start by assigning values to the unknowns, equals ‘=’ means assign. Click below and press ⇧+⌤:

s=30;
u=5;
t=3;
Solve[s==u t+(1/2)a (t^2),a]

NOTE: There are spaces between the letters. In Mathematica this represents multiply: u × t. We can’t just type ut because Mathematica sees this as a single variable called ‘ut’.

Solving Linear Equations

An equation is a mathematical statement that includes and equals sign ‘=’.

({{({{4x+1 is an expression}, {4x+1=5 is an equation}})}})

A linear equation when plotted forms a straight line. The highest power that a pronumeral is raised to within the equation is 1.

We solve linear equations by rearranging to make the unknown, usually x, the subject.

Solve the following linear equations:

({{({{4x-3=11}, {4x=11+3}, {x=(14/4)}, {=(7/2)
}, {2(((3x+1)/4)-5)=10}, {((3x+1)/4)-5=(10/2)}, {((3x+1)/4)=5+5}, {3x+1=10×4}, {3x=40-1}, {x=(39/3)}, {=13
}, {((x-5)/4)+3x-1=((5(x+1))/2)}, {((x-5)/4)+3x-((5(x+1))/2)=1
x-5+12x-10(x+1)=4}, {3x-15=4}, {3x=19}, {x=(19/3)}})}})

Click below and press ⇧ + ⌤ :

Solve[4x-3==11,x]

Write a solve function for the second example: ⇧ + ⌤ to execute.

Solve["write the equation here: use ==",x]

Write a solve function for the third example: ⇧ + ⌤ to execute.

Graphing Linear Equations

The general form of a linear equation is a x+b y+c=0. This form isn’t particularly useful when it comes to trying to graph the equation.

The most common form of a linear equation is the gradient - intercept form: y=m x+c

Either way, you can graph a function in Mathematica using the command Plot. Here’s the Mathematica command to plot the function y=2x-6 :

Plot[2x-6,{x,-5,5}]

The functions must be input in gradient - intercept form. Note also that we don’t type in y=, this is assumed. The {x, -5, 5} tells Mathematica to display the plot over the domain of -5 to 5.

Graph the function y=3x+1 over the domain 0⩽x⩽5

Graph the function 2x+3y-6=0. (Rearrange into gradient - intercept form first.)

Plotting Functions Using Intercepts

We can graph a function using any two points, and two points that we are commonly interested in are the x and y intercepts

Consider the function used previously 2x+3y-6=0.

({{({{To find the y intercept, let x=0}, {3y-6=0}, {3y=6}, {y=2}, {This is the point (0, 2)}, {To find the x intercept, let y=0}, {2x-6=0}, {2x=6}, {x=3}, {This is the point (3,0)}})}})

Plot these points and then draw the function running through the intercepts.

Finding the Equation of a Straight Line

We often need to find the equation of a straight line based on knowing some points (possibly intercepts) or the gradient. We need two pieces of information to get the equation of the line, we need either one point and the gradient, or we need two points.

One Point and the Gradient

If we know the gradient (m) and have one point ((Subscript[x, 1]),(Subscript[y, 1])) of a line we can find its equation using the formula: y-(Subscript[y, 1])=m(x-(Subscript[x, 1]))

Find the equation of the line with gradient 2 that passes through point (3,4):

({{({{y-4=2(x-3)}, {y=2x-6+4}, {=2x-2}})}})

Two Points

If we know two points ((Subscript[x, 1]),(Subscript[y, 1])) and ((Subscript[x, 2]),(Subscript[y, 2]))  then we can find the gradient using: m=(((Subscript[y, 2])-(Subscript[y, 1]))/((Subscript[x, 2])-(Subscript[x, 1])))
So our formula becomes: y-(Subscript[y, 1])=(((Subscript[y, 2])-(Subscript[y, 1]))/((Subscript[x, 2])-(Subscript[x, 1])))(x-(Subscript[x, 1]))

Find the equation of the line that passes through points (2,-1) and (5,4):

({{({{y-(-1)=((4-(-1))/(5-2))(x-2)}, {y=(5/3)x-(10/3)-1}, {=(5/3)x-(13/3)}})}})

Solving Simultaneous Equations

The solving of a set of simultaneous equations finds the point, or points, where the lines intersect. For linear equations there is at most one point where they intersect. (If they are parallel they don’t intersect at all.) This is the point where the equations are equal.

We can find where the points intersect graphically, algebraically or computationally.

Graphical Method

Plot the equations and note where they intersect

Graph y=3x-1 and y=-2x+4

Plot[{3x-1,-2x+4},{x,0,5}]

We can see that the points intersect at (1, 2).

Algebraic Methods

Substitution Method

Use substitution to solve the following simultaneous equations:

({{({{-2x+7y=8                  (1)}, {and y=3x-1    (2)}, {substitute (2) into (1):}, {-2x+7(3x-1)=8}, {-2x+21x-7=8}, {19x=15}, {x=(15/19)              (3)}, {substitute (3) into (2):}, {y=3×(15/19)-1}, {=(26/19)}, {intersect at ((15/19),(26/19))}})}})

Elimination Method

Use elimination to solve the following simultaneous equations:

({{({{3x+8y=5}, {and 5x-2y-2=0}, {set up the equations like an addition:}, {3x+8y=5               (1)}, {         +               5x-2y=2               (2)}, {multiply (2) by 4 so we can eliminate the y term:}, {3x+8y=5}, {+            20x-8y=8}, {23x              =13}, {x=(13/23)           (3)}, {substitute (3) into (1):}, {3×(13/23)+8y=5}, {8y=5-(39/23)}, {y=(19/46)}})}})

Computational Method

Use Mathematica to solve the following simultaneous equations:

({{({{6x-5y=14}, {x+3y-1=0}})}})

Solve[{6x-5y==14,x+3y-1==0},{x,y}]